package org.scalpel.locodo;

import ioio.lib.api.exception.ConnectionLostException;


/**
 * @author Jerome Monceaux
 * @version 1.0
 * 
 * MotorInterface defines the interface used by Locomotion or LocomotionSingle 
 * to set the current speed command and get the encoder value back.
 **/
public interface MotorInterface {

  /** 
   * Return the current encoder value. 
   */ 
  int getEncoderValue();

  /**
   * Set the current speed to motor.
   */ 
  void setSpeed(double speed);

  /** 
   * Update callback. On each cycle Locomotion or LocomotionSingle
   * callback this method back.
   * @throws ConnectionLostException 
   */ 
  void update();

}
